package com.xb.demo.utils;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.connection.jedis.JedisClientConfiguration;
import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.stereotype.Component;

/**
 * @Author gxd
 * @Date： 2018/9/14
 */
@Component
public class JedisUtil {




    @Autowired
    private  StringRedisTemplate stringRedisTemplate;


    public  void sendMessage(String key,String msg){
        //stringRedisTemplate.convertAndSend(key,msg);
        stringRedisTemplate.opsForList().rightPush(key,msg);

    }


}
